Xbasic

eval_mode_get Function

Syntax

Mode as C = EVAL_MODE_GET()

Returns

ModeCharacter

Returns the mode used to evaluate.

Description

Return the mode we are evaluating in - can be used to short circuit a key test.

Discussion

The eval_mode_get() function returns the current mode that Xbasic is being evaluated. This function can be used in Reports to prevent execution of user defined functions (UDFs) that take a long time to execute. For example:

FUNCTION myUDF AS C ()
    IF eval_mode_get() = "Sizeof" THEN
        EXIT FUNCTION
    END IF

    ' Your function code goes here

END FUNCTION

See Also